﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RestSharp;
using Ymatou.API.Common;
using Ymatou.ServiceCenter;
using YmatouSeller.NoticeAPI.Model.Response;

namespace YmatouSeller.NoticeAPI.Model.Request
{
    [Resource("sellernotice.iapi.ymatou.com", "api/NoticeManage/SubmitReadNotice", Method.POST, ParameterBuildType.Json)]
    public class SubmitReadNoticeRequest : BaseRequestModel<SubmitReadNoticeResponse>
    {
        public int SellerId { get; set; }
        public string NoticeId { get; set; }

        public string Resource { get; set; }

        public override string ApiName
        {
            get { return "api/NoticeManage/SubmitReadNotice"; }
        }
    
        public override void Validate()
        {
            const string errCode = "-1";
            if (SellerId ==0)
                throw new Ymatou.API.Common.BussniessException(errCode, "买手id不能为0");
            if (string.IsNullOrEmpty(NoticeId))
                throw new Ymatou.API.Common.BussniessException(errCode, "通知id不能为空");
            base.Validate();
        }
        /// <summary>
        ///  HttpPost
        /// </summary>
        public override bool HttpGet
        {
            get { return false; }
        }
    }
}
